;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; k.Rack
;;
;; virtual Keyboard Rack optimized for the Band Keyboarder
;; currently without a gui - optimized for fast live coding (sorry)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Main Module
;;;;;;;;;;;;;;;;;;;
;; This module glues together all the separate modules

;; Enable Unittests ;;;;;;;;;;;;;;;;
(define use-unit-tests #t)

;; Base Path        ;;;;;;;;;;;;;;;;
;; in the File System
;; TODO: set automatically
(define *kR:BasePath* "/Users/musik/Desktop/k.Rack")

;; as function for easier Access
(define-macro (kR:pathTo . p) `(string-append *kR:BasePath* "/" ,@p)) 


;; Load Packages    ;;;;;;;;;;;;;;;;
;; unit tests
(load (kR:pathTo "utils/unit-tests.scm"))

;; generous scheme helpers
(load (kR:pathTo "utils/scheme_helper.scm"))

;; General System utilities
(load (kR:pathTo "utils/system.scm"))

;; Plugin System
(load (kR:pathTo "utils/plugins.scm"))

;; All that has to do with graph and mixer
(load (kR:pathTo "rack/mixer.scm"))

;; Instruments Package
(load (kR:pathTo "rack/instruments.scm"))

;Midi functions
(load (kR:pathTo "rack/midi.scm"))

;Keyboard functions
(load (kR:pathTo "rack/keys.scm"))


;; Events
(load (kR:pathTo "rack/events.scm"))

;; General control functions
(load (kR:pathTo "rack/control.scm"))

;Songs
(load (kR:pathTo "rack/songs.scm"))

;Sets
(load (kR:pathTo "rack/sets.scm"))

;;Load Plugins
;(plugins:load-from-directory (kR:pathTo "plugins"))

;; Load Custom Instruments
;(plugins:load-from-directory (kR:pathTo "plugins/instruments"))

;; Start the custom skript
;(load (kR:pathTo "live.scm"))